<!--智慧消防V1.0-info页面-->
<template>
    <div class="app-container">
        <el-row :gutter="10">
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                <div style="text-align: center;margin-bottom: 30px">
                    消防隐患详情信息
                </div>
                <el-form :model="nonEmergencyInfo" ref="nonEmergencyInfo"  label-width="150px">
                    <el-col :xs="24" :sm="24" :md="24" :lg="5" :xl="5">
                    <div style="text-align: center">
                        <img v-if="nonEmergencyInfo.reportedPic" :src="nonEmergencyInfo.reportedPic" class="avatar">
                        <i v-else class="el-icon-picture-outline avatar-uploader-icon"></i>
                        <div style="line-height: 44px">*上报图片*</div>
                    </div>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="消防隐患描述信息"  prop="name">
                            {{nonEmergencyInfo.name}}
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="所属主体"  prop="enterpriseName">
                            {{nonEmergencyInfo.enterpriseName}}
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="上报人 " prop="reportedUserName">
                            {{nonEmergencyInfo.reportedUserName}}
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="处置状态" prop="handleStatus">
                            {{nonEmergencyInfo.handleStatus  | infoStatus}}
                        </el-form-item>
                    </el-col>
                        <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                            <el-form-item label="处置时间" prop="handleTime">
                                {{nonEmergencyInfo.handleTime  | dateFormat}}
                            </el-form-item>
                        </el-col>
                    <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
                        <el-form-item label="隐患描述信息" prop="content">
                            {{nonEmergencyInfo.content  }}
                        </el-form-item>
                    </el-col>

                    </el-col>
                </el-form>
            </el-col>
        </el-row>


    </div>

</template>

<script>
import {getInNonEmergencyVo} from "@/api/nonEmergency";

export default {
    name: "nonEmergencyInfo",
    data(){
        return{
            nonEmergencyInfo:{},


        }
    },
    created() {
        this.getInNonEmergencyVo()
    },
    methods:{
        getInNonEmergencyVo(){
            getInNonEmergencyVo({ucId:this.$route.params.ucId}).then(res=>{
                this.nonEmergencyInfo = res.data
                this.$notify.success({
                    title: '成功',
                    message: "获取异常信息成功"
                })
            }).catch(error=>{
                this.$notify.error({
                    title: '失败',
                    message: error.message
                })
            })
        }
    },
    filters:{
        infoStatus(val){
            let handletatus = "";
            switch (val){
                case 0:
                    handletatus = "未处置";
                    break;
                case 1:
                    handletatus = "处置中";
                    break;
                case 2:
                    handletatus = "处置完成";
                    break;
                default:
                    break;
            }
            return handletatus;
        }
    }

}
</script>
<style>
.avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 149px;
    height: 149px;
    line-height: 149px;
    text-align: center;
}
.avatar {
    width: 149px;
    height: 149px;
    display: block;
    margin: 0 auto; /*水平居中*/
}
</style>
